package com.no1.musicmgr.mapper;

import com.no1.musicmgr.entity.Song;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.Set;

/**
 * @author 17739
 */
@Mapper
public interface SongMapper {

    /**
     * 插入音乐
     * @param song
     * @return
     */
    boolean insert(Song song);

    /**
     * 删除音乐
     * @param songId
     * @return
     */
    boolean deleteById(Integer songId);

    /**
     * 更新音乐
     * @param song
     * @return
     */
    boolean update(Song song);

    /**
     * 通过id查询音乐
     * @param songId
     * @return
     */
    Song selectById(Integer songId);

    /**
     * 按条件查询音乐
     * @param song
     * @return
     */
    ArrayList<Song> list(Song song);


    Set<String> select(String user_id);
}
